Cube with vibrating sides (Interior)
Importing related packages
using LinearAlgebra, BoundaryIntegralEquations, IterativeSolvers, Plots, SpecialFunctions, Meshes
import WGLMakie as wgl # WGLMakie integrates into VSCode. Other backends can also be used.
wgl.set_theme!(resolution=(800, 800))Loading and visualizing the triangular cube mesh
First we define the path to the mesh file
mesh_file = joinpath(dirname(pathof(BoundaryIntegralEquations)),"..","examples","meshes","1m_cube_extremely_coarse");Now we read in the mesh
physics_orders = [:linear,:geometry,:disctriconstant,:disctrilinear,:disctriquadratic];
mesh = load3dTriangularComsolMesh(mesh_file;geometry_order=:linear, physics_order=physics_orders[5])Number of elements: 84
Number of unkowns: 504
Geometry defined by: TriangularLinear{Float64}
Physics defined by: DiscontinuousTriangularQuadratic{Float64}
We now define the mesh entity that contain the boundary condition. In this case it is boundary 0.
bc_ents = [0];Now two simple meshes is created. One for the boundary condition and one for the remaining part of the mesh
simple_bc = create_bc_simple_mesh(mesh,bc_ents);
simple_mesh = create_bc_simple_mesh(mesh,bc_ents,false);Using the simple meshes we can visualize the mesh, with boundary 0 (where velocity condition will be applied) shown in red
viz(simple_mesh;showfacets=true)
viz!(simple_bc;showfacets=true,color=:red)
wgl.current_figure()